﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:SLExtensions.SocketClient"
                    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows">
    <Style TargetType="local:PersistantSocketStateDisplayer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:PersistantSocketStateDisplayer">
                    <Canvas Width="28" Height="8">
                		<vsm:VisualStateManager.VisualStateGroups>
                			<vsm:VisualStateGroup x:Name="ConnectionState">
                				<vsm:VisualStateGroup.Transitions>
                					<vsm:VisualTransition GeneratedDuration="00:00:00.1000000"/>
                				</vsm:VisualStateGroup.Transitions>
                				<vsm:VisualState x:Name="Connected" >
                					<Storyboard>
                						<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="middle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                							<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF644501"/>
                						</ColorAnimationUsingKeyFrames>
                						<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="middle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                							<SplineColorKeyFrame KeyTime="00:00:00" Value="#FFCA8C03"/>
                						</ColorAnimationUsingKeyFrames>
                						<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="right" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                							<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF256A00"/>
                						</ColorAnimationUsingKeyFrames>
                						<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="right" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                							<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF48D000"/>
                						</ColorAnimationUsingKeyFrames>
                					</Storyboard>
                				</vsm:VisualState>
                				<vsm:VisualState x:Name="Connecting" >
                					<Storyboard>
                						<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="middle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                							<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF644501"/>
                						</ColorAnimationUsingKeyFrames>
                						<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="middle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                							<SplineColorKeyFrame KeyTime="00:00:00" Value="#FFCA8C03"/>
                						</ColorAnimationUsingKeyFrames>
                					</Storyboard>
                				</vsm:VisualState>
                				<vsm:VisualState x:Name="Disconnected" />
                			</vsm:VisualStateGroup>
                		</vsm:VisualStateManager.VisualStateGroups>
                    	<Ellipse Height="8" Width="8" Stroke="#FF000000" Canvas.Left="0" x:Name="left" StrokeThickness="0.5">
                    		<Ellipse.Fill>
                    			<RadialGradientBrush>
                    				<RadialGradientBrush.RelativeTransform>
                    					<TransformGroup>
                    						<ScaleTransform/>
                    						<SkewTransform/>
                    						<RotateTransform/>
                    						<TranslateTransform X="0" Y="-0.115"/>
                    					</TransformGroup>
                    				</RadialGradientBrush.RelativeTransform>
                    				<GradientStop Color="#FF6A0000"/>
                    				<GradientStop Color="#FFE40303" Offset="1"/>
                    			</RadialGradientBrush>
                    		</Ellipse.Fill>
                    	</Ellipse>
                    	<Ellipse Height="8" Width="8" Stroke="#FF000000" Canvas.Left="10" x:Name="middle" StrokeThickness="0.5">
                    		<Ellipse.Fill>
                    			<RadialGradientBrush>
                    				<RadialGradientBrush.RelativeTransform>
                    					<TransformGroup>
                    						<ScaleTransform/>
                    						<SkewTransform/>
                    						<RotateTransform/>
                    						<TranslateTransform X="0" Y="-0.115"/>
                    					</TransformGroup>
                    				</RadialGradientBrush.RelativeTransform>
                    				<GradientStop Color="#FF666666"/>
                    				<GradientStop Color="#FFC6C6C6" Offset="1"/>
                    			</RadialGradientBrush>
                    		</Ellipse.Fill>
                    	</Ellipse>
                    	<Ellipse Height="8" Width="8"  Stroke="#FF000000" Canvas.Left="20" x:Name="right" StrokeThickness="0.5">
						<Ellipse.Fill>
                    			<RadialGradientBrush>
                    				<RadialGradientBrush.RelativeTransform>
                    					<TransformGroup>
                    						<ScaleTransform/>
                    						<SkewTransform/>
                    						<RotateTransform/>
                    						<TranslateTransform X="0" Y="-0.115"/>
                    					</TransformGroup>
                    				</RadialGradientBrush.RelativeTransform>
                    				<GradientStop Color="#FF666666"/>
                    				<GradientStop Color="#FFC6C6C6" Offset="1"/>
                    			</RadialGradientBrush>
                    		</Ellipse.Fill>
						</Ellipse>
                	</Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
